import {
  Column,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
  CreateDateColumn,
  Generated,
} from "typeorm";

export class BaseEntity {
  // 主键id
  @PrimaryGeneratedColumn("uuid")
  id: string;

  // 创建时间
  @CreateDateColumn({ name: "create_time" })
  createTime: Date;

  // 更新时间
  @UpdateDateColumn({ name: "update_time" })
  updateTime: Date;

  // 软删除
  @Column({
    default: false,
    name: "is_delete",
  })
  isDelete: boolean;
}
